home *** CD-ROM | disk | FTP | other *** search
- '
- 'Class description:
- '
- !short:Info class structure:
- Class Info:
- ~~~~~~~~~~~
- This class can produce an object for viewing of the text variable
- (memo field).
-
-
- Common use:
- ~~~~~~~~~~~
- LOCAL OBJECT Info OF Info
- Info:Buff:=cBigText //the vieved text is stored to buffer
- Info:Init(...) //or Info:GoodInit(...)
-
- The initialistion only adds this object to task stack as a task (look at the
- class Task). The activation of virtual process for this object or its
- finishing is job for the task swapper.
-
- Source code is in C_Info.prg
-
- !seealso: c_task.ngo:Task c_box.ngo:Box c_finfo.ngo:FInfo c_color.ngo:Color ob_class.ngo:"Class hierarchy"
-
- !short:~~~~~~~~~~~~~~~~~~~~~
- !short:create class Info from Task
- !short: export:
- !short: var Wrap //true
- ^BInfo:Wrap^N: public: logical
- Sets the "wrap" property for clipper function Memo Edit, which is used as
- the own dispalyer for the objects of this class.
-
- !short: var FName //""
- ^BInfo:FName^N: private: character
- The file name to which is the viewed text (contet of instvar variable Buff)
- written is stored here, when the user decides to print the viewed text.
- Printing is done by dos command PRINT in the background. For correct
- printing should the resident part of PRINT command be loaded before
- the starting of the program.
-
- !short: var CanPrint //true
- ^BInfo:CanPrint^N: public: logical
- If true, the printing of the viewed text is enabled.
-
- !short: var CanEdit //false
- ^BInfo:CanEdit^N: public: logical
- If true the viewed text can be edited.
-
- !short: var RecNo //0
- ^BInfo:RecNo^N: public: numeric
- Abstract variable for the function HelpField(), used for storing of the
- current record number of database cHelp.
- (Interactive help database, System3.dbf)
-
- !short: var CanErase //false
- ^BInfo:CanErase^N: public: logical
- If true and the viewed text was sent to print (i.e. if Info:Printed is
- true), the system by finishing of this task asks for validation if the file
- can be erased and if yes it is erased. If the file was sent to print it was
- written to temporary file and this file was printed by Print command.
- This instvar variable refers if the file should be erased or no.
-
- !short: var Printed //false
- ^BInfo:Printed^N: private: logical
- If the file was sent to print it is true. Library is informed about
- the creation of the temporary file for its further erasing after
- the end of the task.
-
- !short: var SeeTop //true
- ^BInfo:SeeTop^N: private: logical
- This is only the help instvar variable for unnecessary defining of the
- whole method Process() in the class FInfo. With the instvar private
- variable SeeBottom it is used for finishing of MemoEdit function when
- is there a need of reading of next part of the text from the file
- to instvar variable Buff.
-
- !short: var SeeBottom //true
- ^BInfo:SeeBottom^N: private: logical
- This is a help instvar variable used for unnecessary defining of the
- whole method Process() in the class FInfo. See the instvar variable SeeTop.
-
- !short: var TextRow //1
- ^BInfo:TextRow^N: public: numeric
- Sets the text row (Instvar variable Buff), which will be by method
- Process() displayed as first line of the window. Its change can set
- the text view begining.
-
- !short: var TextMax //0
- ^BInfo:TextMax^N: private: numeric
- It is the number of rows for the display mode of MemoEdit function
- (window wrap).
-
- !short: var Buff //""
- ^BInfo:Buff^N: public: character
- This instvar variable is the viewed text stored to.
-
- !short: method New=InfoNew //o:New() --> self
- ^BInfo:New()^N: public: return self
- The object is filled by default values, the following predcessor
- variables are modified:
-
- ^UInfo:Color^N: public: character
- Color definition of the window of this task.
-
- ^UInfo:DoneBlock^N: public: character
- This instvar variable is stored a code block to, which by finishing of
- the task does the erasing of the temporary work file. The workfile is
- created when the user sends the text to print. If you dislike this code
- block, you can replace it by own one just after the creation of the
- object of this class, for example:
- LOCAL OBJECT Inf OF Info
- Inf:Buff:=....
- Inf:DoneBlock:={|Self|NewDoneFunction(Self)}
- Inf:Init(...)
- Where NewDoneFunction(Self) should be user defined function, which is
- processed by atempt of finishing of this object. As parameter obtains
- self object ^UInf^N. It should return true if the object could be finished
- and false if it couldn't and must stay active. (to stay active means that
- the object is on the top of the stack of the task, its window is repainted
- with active window colors and the method VProcess() is activated for this
- object. All this job is done by task swapper (method Task:Process()).)
-
- !short: method Init=InfoInit //o:Init(Name,R,C,Rs,Cs,Clr,Shd) --> true
- ^BInfo:Init(Name,R,C,Rs,Cs,Clr,Shadow)^N: public: return true
- The object is initialised, all parameters are not compulsory, if used they
- are passed to predcessor method Box:Init(...). For detailed decription use
- look at the class ^UBox^ method ^UInit(...)^N.
-
- !short: method GoodInit=InfoGoodInit //o:GoodInit(Name,R,C,Rs,Cs,CurSize,Clr,Shd) --> true
- ^BInfo:GoodInit(Name,R,C,Rs,Cs,CurSize,Clr,Shadow)^N: public: return true
- The object is initialised, all parameters are not compulsory, if used they
- are passed to predcessor method Box:GoodInit(...). For detailed decription
- use look at the class ^UBox^ method ^UGoodInit(...)^N.
-
- !short: method Print=InfoPrint //o:Print() --> true/false
- ^BInfo:Print()^N: public: return true/false
- Tries to send the text to file for printing, if fails returns false,
- otherwise the file is sent to print, printed by PRINT command and returns
- true.
-
- !short: method VPaint=InfoVPaint //o:VPaint() --> true
- ^BInfo:VPaint()^N: private: return true
- This method is used for painting of the content of the window to the screen.
- If you want to paint the object, use the method Info:Paint(), herited from
- class ^UWindow^N.
-
- !short: method VProcess=InfoVProcess //o:VProcess() --> true
- ^BInfo:VProcess()^N: private: return true
- The text view by using of the function MemoEdit or by activating of the
- method Print() and printing is processed herewith.
-
- !short: endclass
-
-